<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text">
</body>
<script>
  class Input{
   constructor(){
     this.num = 10
     console.log(this); //this指向实例化出来的对象
    //    获取input节点
    let input = document.querySelector('input')
    // 给input节点注册一个失去焦点事件
    input.onblur = this.fn.bind(this,'刘德华',18)
   }
   fn(name,age){
    console.log(name,age);
      console.log(this.num);//fn里面的this指向 input节点 获取获取不到对象上的属性
      console.log('hhhhhh');
   }
  }
  let i = new Input()
  console.log(i);
</script>
</html>